package com.study;

// 类是方法和属性的集合
public class Mobile {
    public String brand;
    public String color;
    public double price;
    private String name;
    // 方法名相同  参数类型不同  参数个数不同  参数顺序不同
    Mobile(){}

    Mobile(String brand, String color, double price){
        this.brand = brand;
        this.color = color;
        this.price = price;
    }
    Mobile(double price, String brand, String color){
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return this.name;
    }

    public void description(String brand){
        System.out.println("这是一款" + brand + "的手机,我太喜欢了！");
    }
}
